﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
using LightSwitchApplication.UserCode;

namespace LightSwitchApplication
{
    public partial class trTraingroupStakeholder
    {
        partial void trTraingroupStakeholder_Created()
        {
            this.tlCustomProperty = this.DataWorkspace.ApplicationData.tlCustomPropertySet.Where(property => property.StaticId == 2).FirstOrDefault();  // Default to Mitglieder Typen
            this.tlCustomPropertyChoices = this.DataWorkspace.ApplicationData.tlCustomPropertyChoicesSet.Where(property => property.StaticId == 4).FirstOrDefault();  // Default to Mitglied
        }

        partial void CustomPropertyValue_Validate(EntityValidationResultsBuilder results)
        {
            CustomPropertiesHandling handle = new CustomPropertiesHandling(this.tlCustomProperty, this.tlCustomPropertyChoices, this.CustomPropertyValue);
            handle.CustomPropertyValue_Validate(results);
        }

        partial void tlCustomPropertyChoices_Validate(EntityValidationResultsBuilder results)
        {
            CustomPropertiesHandling handle = new CustomPropertiesHandling(this.tlCustomProperty, this.tlCustomPropertyChoices, this.CustomPropertyValue);
            handle.tlCustomPropertyChoices_Validate(results);
        }
    }
}
